#import <UIKit/UIKit.h>
#import "GenericSearchView.h"
#import "MapPOISearchDelegate.h"
#import "SFUConstants.h"
#import "GraphicsUtilities.h"

/**
 * A MapPOISearchView is an object representing the view that 
 * displays a list of points of interest by which to search for 
 * on the map.
 *
 * A MapPOISearchDelegate must be set to respond to events from
 * the map point of interest search viewer.
 *
 * @author      James Lin
 * @version     1.0.3
 * @since       1.0.3
 * @see         GenericSearchView
 * @see         MapPOISearchDelegate
 */
@interface MapPOISearchView : UIViewController <GenericSearchView> {
	id<MapPOISearchDelegate> delegate;      // Delegate handling POI search events
	NSArray*                 poiList;       // Data source for the table of POIs
	NSMutableArray*          selectedPois;  // The list of selected POI categories
	UITableView*             poiTableView;  // Table of points of interest
	UIToolbar*               poiToolbar;    // Toolbar for the POI search view
	UINavigationController*  parentNav;     // The parent navigation controller
}

/**
 * Retrieve the shared instance of the map point of interest search view.
 *
 * @return  the shared instance of MapPOISearchView
 */
+ (MapPOISearchView*)sharedMapPOISearchView;

/**
 * Get the delegate handling events from this view.
 *
 * @return  the delegate handling events from this view
 * @see     MapGenericSearchView
 */
- (id<MapPOISearchDelegate>)delegate;

/**
 * Set the delegate handling events from this view.
 *
 * @param theDelegate  the delegate handling events from this view
 * @see                MapGenericSearchView
 */
- (void)setDelegate:(id)theDelegate;

/**
 * Display the table listing of points of interest in a new view.
 *
 * Pushes this view onto the navigation controller stack of the parent
 * view. Upon tapping the back button, the view is automatically 
 * popped off the top of the navigation stack.
 *
 * @param pois      the list of points of interest to display
 * @param navController  the navigation controller of the parent view
 */
- (void)displayViewWithPOIs:(NSArray*)pois 
				   navController:(UINavigationController*)navController;

@end
